Skip to content

[3.12] gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995)#110202

Merged
Yhg1s merged 1 commit intopython:3.12from
miss-islington:backport-29b875b-3.12
Oct 2, 2023
Merged

[3.12] gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995)#110202
Yhg1s merged 1 commit intopython:3.12from
miss-islington:backport-29b875b-3.12

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 2, 2023

The default arguments for shutil.which() request an executable file, but extensionless files are not executable on Windows and should be ignored.
(cherry picked from commit 29b875b)

Co-authored-by: Charles Machalow csm10495@gmail.com


📚 Documentation preview 📚: https://cpython-previews--110202.org.readthedocs.build/

…xtension on executable files (pythonGH-109995)

The default arguments for shutil.which() request an executable file, but extensionless files are not executable on Windows and should be ignored.
(cherry picked from commit 29b875b)

Co-authored-by: Charles Machalow <csm10495@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants